const wechat = require('co-wechat');

module.exports = () => {
  return wechat({
    token: '1234smr',
    appid: 'wxf675cf3b7509f272',
    encodingAESKey: 's6r1zzdzLxvIZfR0d4gYzmEvekzKJPzWbYpiD59lAks',
  }).middleware(async (message, ctx) => {
    console.log('message', message, ctx);
    return { type: 'text', content: 'Hello world!666' };
  });
};
